﻿using UnityEngine;
using System.Collections;

public class CharacterViewerTestBtn : MonoBehaviour {

	public int nType;

	void OnClick()
	{
		CharacterViewer.Instance.OnAction(nType);
		if(nType==10) {
			if(CharacterViewer.Instance.curTimeScale==1)
				GetComponent<UILabel>().text = "x1";
			else if(CharacterViewer.Instance.curTimeScale==0.5)
				GetComponent<UILabel>().text = "x0.5";
			else if(CharacterViewer.Instance.curTimeScale==0.25)
				GetComponent<UILabel>().text = "x0.25";
		}
	}

	void Update()
	{
		if(nType>=2 && nType<=3) {
			if(CharacterViewer.Instance.OriginalCamTrans[nType-1]==null) {
				gameObject.SetActive(false);
				enabled=false;
			}
		}
	}
}
